#pragma once 

#include "AbstractData.h"
#include "GameDeviceSingleton.h"
#include "ItemParameters.h"

class ItemData : public AbstractData {
protected:
	int _itemType;// type of effect of this item: more-gun, more-life, gun-r, gun-m,... 
	Rect* _targetRect; // ref rect of player to set item direction
	double _baseY;
	int _direction;

	virtual void _initDirection();

public:
	int itemRandom;
	double counter;
	bool isActived;
	double rangeOfEffect;
	ItemBlockStates stateitem;

	ItemData(int id, int itemType, double x, double y, Rect* targetRect);

	virtual Rect* getTargetRect();

	virtual void setState(ItemBlockStates state);

	virtual double getBaseY();

	virtual int getDirection();

	virtual void initSprite();

	virtual void initData() {
	}

	virtual void initSpriteHandler();

	virtual void initSpriteHandler(LPD3DXSPRITE spriteHandler);

	virtual int getItemType();
};

